package com.bw.controller;

import com.alibaba.fastjson.JSON;
import com.bw.entity.Role;
import com.bw.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

/**
 * Created by qpx on 2018/5/22.
 */
@Controller
public class TestController {

    @Autowired
    RoleService roleService;

    @RequestMapping("/test")
    public String test(){
        List<Role> roles = roleService.selectByCondition(new Role());
        System.out.println(JSON.toJSONString(roles));
        return "/test";
    }
}
